#ifndef TEX_EFFECT_H
#define TEX_EFFECT_H

#include"StdAfx.h"
#include"EffectBase.h"

class TexEffect : public EffectBase
{
public:
	TexEffect( ID3D11Device* device, const std::wstring& filename );
	~TexEffect( );

	void SetWorld(CXMMATRIX M)							{ m_world->SetMatrix(reinterpret_cast<const float*>(&M)); }
	void SetView(CXMMATRIX M)							{ m_view->SetMatrix(reinterpret_cast<const float*>(&M)); }
	void SetProj(CXMMATRIX M)							{ m_proj->SetMatrix(reinterpret_cast<const float*>(&M)); }
	void SetTexture(ID3D11ShaderResourceView* tex)      { m_texture->SetResource(tex); }

public:
	ID3DX11EffectTechnique* m_Tech;

private:
	ID3DX11EffectMatrixVariable* m_world;
	ID3DX11EffectMatrixVariable* m_view;
	ID3DX11EffectMatrixVariable* m_proj;

	ID3DX11EffectShaderResourceVariable* m_texture;
};
#endif